/* 通用按钮组件样式 */
.common-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  outline: none;
}

/* 按钮变体样式 */
.common-btn--primary {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.common-btn--primary:hover:not(.common-btn--disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.common-btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.common-btn--secondary:hover:not(.common-btn--disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.common-btn--danger {
  background: linear-gradient(45deg, #ff4757, #ff3838);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.common-btn--danger:hover:not(.common-btn--disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.common-btn--ghost {
  background: transparent;
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.common-btn--ghost:hover:not(.common-btn--disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* 按钮大小样式 */
.common-btn--small {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 28px;
}

.common-btn--medium {
  padding: 8px 16px;
  font-size: 14px;
  min-height: 36px;
}

.common-btn--large {
  padding: 12px 24px;
  font-size: 16px;
  min-height: 44px;
}

/* 禁用状态 */
.common-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 涟漪效果 */
.common-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.common-btn:active::before {
  width: 200px;
  height: 200px;
}

/* 图标按钮 */
.common-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.common-btn--icon.common-btn--small {
  width: 28px;
  height: 28px;
}

.common-btn--icon.common-btn--large {
  width: 44px;
  height: 44px;
}

/* 加载状态 */
.common-btn--loading {
  position: relative;
  color: transparent;
}

.common-btn--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .common-btn--medium {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
  }
  
  .common-btn--large {
    padding: 10px 20px;
    font-size: 15px;
    min-height: 40px;
  }
}
